import axios from 'axios';

let base = 'https://mihuiapi.com/cubos/api/cu/bos';
// let base = 'http://18.162.210.135:18081/api/cu/bos';

let baseApiKey = 'https://mihuiapi.com/newcuuser/api/dict'
let baseImg = 'https://mihuiapi.com/cubos/api/cu/public'
// 交易钱包 限额设置
let baseTime = 'https://mihuiapi.com/cubos/api/cu/public'
let baseBinance = 'https://mihuiapi.com/cubos/api/cu';

// webseackt
let sdecimal = 'https://mihuiapi.com/cumarket/api'
// '/market/v2/product?platform=real&needThreeMoth=false'
export const getsdecimal = (params,url) => {return axios.get(`${sdecimal}${url}`,params,{ headers: { 'X-authorization':  sessionStorage.getItem('boxToken') }});}; 


//匹配 key
export const getUserOpenDict = (params,url) => {return axios.get(`${baseApiKey}${url}`,{ params: params , headers: { 'X-authorization':  sessionStorage.getItem('boxToken') }});}; //用户列表key

export const getUserStakingDelete = (url) => {return axios.delete(`${base}${url}`,{ headers: { 'X-authorization':  sessionStorage.getItem('boxToken') }})}; 
export const getUserRequest = (params,url) => {return axios.get(`${base}${url}`,{ params: params , headers: { 'X-authorization':  sessionStorage.getItem('boxToken') }})}
export const postUserRequest = (params,url) => {return axios.post(`${base}${url}`,params,{ headers: { 'X-authorization':  sessionStorage.getItem('boxToken') }});}; 
export const getNudataRequest = (url) => {return axios.get(`${base}${url}`,{ headers: { 'X-authorization':  sessionStorage.getItem('boxToken') }});}; 
// get
export const postNudataRequest = (url) => {return axios.get(`${base}${url}`,{ headers: { 'X-authorization':  sessionStorage.getItem('boxToken') }});}; 

// 交易钱包 限额设置time
export const getUserRequestTime = (url) => {return axios.get(`${baseTime}${url}`,{ headers: { 'X-authorization':  sessionStorage.getItem('boxToken') }});}
export const postUserRequestTime = (params,url) => {return axios.post(`${baseTime}${url}`,params,{ headers: { 'X-authorization':  sessionStorage.getItem('boxToken') }});}; 

// 上传图片
export const getUserListMessageImg = (params,url) => {return axios.post(`${baseImg}${url}`,params,{ headers: { 'Content-Type': 'application/json'}});}; //修改用户全部信息上传图片

export const binance = (url) => {return axios.get(`${baseBinance}${url}`,{ headers: { 'X-authorization':  sessionStorage.getItem('boxToken') }});}; 

// 交易钱包禁用启用
export const PatchRequest = (params,url) => {return axios.patch(`${base}${url}`,{ params: params , headers: { 'X-authorization':  sessionStorage.getItem('boxToken') }})}







